router.post("/regist", async (ctx, next) => {
	await next()
	let dname = ctx.request.body["dname"]
	let dimg = ctx.request.body["dimg"]
	let dtel = ctx.request.body["dtel"]
	let dpassword = ctx.request.body["dpassword"]
	let dnumber = ctx.request.body["dnumber"]
	if (dtel == undefined || dtel == '') {
		ctx.body = {msg:"用户电话不能为空",err:""}
		return
	}
	if (dpassword == undefined || dpassword == '') {
		ctx.body = {msg:"用户密码不能为空",err:""}
		return
	}
	if (dname == undefined || dname == '') {
		ctx.body = {msg:"真实姓名不能为空",err:""}
		return
	}
	// 注册本质，存
	let result = await new User({
		dname, //uname:uname
		dpassword,
		dnumber,
		dtel,
		dimg
	}).save().then(() => {
		return {msg:"用户保存成功",err:""}
	}).catch(err => {
		return {msg:"用户保存不成功",err:""}
	})

	ctx.body = result

})